<?php
	define('SEPARATOR', '/');
	define('BASE_ABS',	'');
	define('VIEW_ABS',	'views');
	define('APPS_ABS',  'apps');
	define('VIEW_EXT',	'.html');
	define('APPS_EXT',	'.php');
	
	require("common.php");
	$RTR			= new Router ($_SERVER['REDIRECT_URL']);
	$template		= VIEW_ABS . $RTR->views;
	$control		= APPS_ABS . $RTR->apps;
	$params			= $RTR->args;

	list($module, $action, ) = $RTR->segments;

	require('init_top.php');
	if (file_exists($template)) $tp = new template($template);
	if (file_exists($control)) require($control);

	if (file_exists($template)) $tp->Display(); 
?>